<!-- 选择模式 -->
<template>
    <div>
        <img src="@/assets/reports/bzh.png" @click="selPro(1)" alt="">
        <img src="@/assets/reports/wzh.png" @click="selPro(2)" alt="">
    </div>
</template>

<script>
import { ref, reactive, getCurrentInstance } from 'vue'
export default {
    setup() {
        const { proxy } = getCurrentInstance();

        const userPromotionId = ref('1');
        console.log(location.search)
        const search = location.href.split('?');
        console.log(search,'search')

        const selPro = (proId) => {
            var url = `https://${location.host}${location.pathname}#/searchPay?userPromotionId=${proId}`
            if(search.length > 1){
                url = `${url}&${search[1]}`
            }
            location.href = url;
        }

        // var url = `https://${location.host}${location.pathname}#/searchPay?userPromotionId=${userPromotionId.value}&${location.search}`;
        // location.href = url;

        return {
            selPro,
        }
    }
}

</script>
<style scoped>
img{
    width: 100%;
    margin-bottom: 10px;
}
</style>